<template>
	<view class="form-item">
		<view class="form-item__label">
			{{ label }}
		</view>
		<view class="form-item__control">
			<slot />
		</view>
	</view>
</template>

<script lang="ts" setup>
	
	//声明Props
	defineProps<{
		label : string
	}>()
	
</script>

<style lang="scss">
.form-item{
		display: flex;
		height: 100rpx;
		border-bottom: 1px solid #000;
		padding: 0 20rpx;
		align-items: center;
		&__label {
			width: 200rpx;
		}
		
		&__control {
			flex: 1;
			// overflow: hidden;
			text-align: right;
		}
	}
</style>